package com.sinvo.oa.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sinvo.oa.entity.model.system.SysRole;
import com.sinvo.oa.entity.vo.system.AssignRoleVo;
import com.sinvo.oa.entity.vo.system.SysRoleQueryVo;

import java.util.Map;

/**
 * @Description 角色 service接口
 */
public interface SysRoleService extends IService<SysRole> {
    //分页查询角色数据
    Page<SysRole> findRoleByPage(Page<SysRole> page, SysRoleQueryVo sysRoleQueryVo);

    //保存角色
    void saveRole(SysRole sysRole);

    //更新角色
    void updateRole(SysRole sysRole);

    //根据userId查询其角色
    Map<String,Object> findRoleByUserId(Long userId);

    //分配角色
    boolean assignRoles(AssignRoleVo assignRoleVo);

    //删除角色
    boolean removeRole(Long id);
}
